function initFlag(token){
	var $obj			= $("#likeNodeObject"+token);
	var $parent			= $obj.parent('.coregreennet-wd-rating');
	var $object_id		= $parent.attr('object_id');
	var $action			= $obj.attr('action');
	
	var $rating_value	= $obj.attr('rating_value');
	var $rating_type	= $parent.attr('rating_type');
	
	var $classLike		= $obj.attr('classLike');
	var $classUnlike	= $obj.attr('classUnlike');
	var $actionLike		= $obj.attr('actionLike');
	var $actionUnlike	= $obj.attr('actionUnlike');

	if(users == false){
		window.location.href = homeURL+ "/users/login";
		return false;
	}
	$.ajax({
		url		: $action,
		type	: 'POST',
		datatype: 'json',
		data	: 'object_id=' + $object_id
					+ '&rating_type=' + $rating_type
					+ '&rating_value=' + $rating_value,
		success	: function($res){

			if ($res != null) {
				
				var htmli = '<i></i>';
				
				if ($res.value=='Like') {
					
					$obj.find('i').removeClass($classLike);
					$obj.find('i').addClass($classUnlike);
					$obj.attr('action', $actionLike);
					var htmli = '<i class="'+$classUnlike+'"></i>';
				} else {
					$obj.find('i').removeClass($classUnlike);
					$obj.find('i').addClass($classLike);
					$obj.attr('action', $actionUnlike);
					var htmli = '<i class="'+$classLike+'"></i>';
				}
				
				$("#stringLike"+token).html($res.people);
				$obj.attr('rating_value', $res.value);
				$obj.attr('number', $res.number);
				// $obj.text($res.value);
			}
		},
	});
}
